package com.pro.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.Objects;

/**
 * @Author 谭金诚
 * @Description TODO
 * @Date 2022/1/17
 * @Version 1.0
 */
public class JsAuditLog {

  private Integer auditLogId;
  private String tableName;
  private String type;
  private Integer userId;
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private Date createDate;
  private String remark;
  private Integer aduitLogType;
  private Integer mainId;
  private Integer aduitId;
  private String trueName;

  @Override
  public String toString() {
    return "JsAuditLog{" +
            "auditLogId=" + auditLogId +
            ", tableName='" + tableName + '\'' +
            ", type='" + type + '\'' +
            ", userId=" + userId +
            ", createDate=" + createDate +
            ", remark='" + remark + '\'' +
            ", aduitLogType=" + aduitLogType +
            ", mainId=" + mainId +
            ", aduitId=" + aduitId +
            ", trueName='" + trueName + '\'' +
            '}';
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    JsAuditLog that = (JsAuditLog) o;
    return Objects.equals(auditLogId, that.auditLogId) &&
            Objects.equals(tableName, that.tableName) &&
            Objects.equals(type, that.type) &&
            Objects.equals(userId, that.userId) &&
            Objects.equals(createDate, that.createDate) &&
            Objects.equals(remark, that.remark) &&
            Objects.equals(aduitLogType, that.aduitLogType) &&
            Objects.equals(mainId, that.mainId) &&
            Objects.equals(aduitId, that.aduitId) &&
            Objects.equals(trueName, that.trueName);
  }

  @Override
  public int hashCode() {
    return Objects.hash(auditLogId, tableName, type, userId, createDate, remark, aduitLogType, mainId, aduitId, trueName);
  }

  public String getTrueName() {
    return trueName;
  }

  public void setTrueName(String trueName) {
    this.trueName = trueName;
  }

  public JsAuditLog(Integer auditLogId, String tableName, String type, Integer userId, Date createDate, String remark, Integer aduitLogType, Integer mainId, Integer aduitId, String trueName) {
    this.auditLogId = auditLogId;
    this.tableName = tableName;
    this.type = type;
    this.userId = userId;
    this.createDate = createDate;
    this.remark = remark;
    this.aduitLogType = aduitLogType;
    this.mainId = mainId;
    this.aduitId = aduitId;
    this.trueName = trueName;
  }

  public JsAuditLog() {
  }

  public JsAuditLog(Integer auditLogId, String tableName, String type, Integer userId, Date createDate, String remark, Integer aduitLogType, Integer mainId, Integer aduitId) {
    this.auditLogId = auditLogId;
    this.tableName = tableName;
    this.type = type;
    this.userId = userId;
    this.createDate = createDate;
    this.remark = remark;
    this.aduitLogType = aduitLogType;
    this.mainId = mainId;
    this.aduitId = aduitId;
  }

  public Integer getAuditLogId() {
    return auditLogId;
  }

  public void setAuditLogId(Integer auditLogId) {
    this.auditLogId = auditLogId;
  }

  public String getTableName() {
    return tableName;
  }

  public void setTableName(String tableName) {
    this.tableName = tableName;
  }

  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }

  public Integer getUserId() {
    return userId;
  }

  public void setUserId(Integer userId) {
    this.userId = userId;
  }

  public Date getCreateDate() {
    return createDate;
  }

  public void setCreateDate(Date createDate) {
    this.createDate = createDate;
  }

  public String getRemark() {
    return remark;
  }

  public void setRemark(String remark) {
    this.remark = remark;
  }

  public Integer getAduitLogType() {
    return aduitLogType;
  }

  public void setAduitLogType(Integer aduitLogType) {
    this.aduitLogType = aduitLogType;
  }

  public Integer getMainId() {
    return mainId;
  }

  public void setMainId(Integer mainId) {
    this.mainId = mainId;
  }

  public Integer getAduitId() {
    return aduitId;
  }

  public void setAduitId(Integer aduitId) {
    this.aduitId = aduitId;
  }

}
